﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Employee/Employee.master" AutoEventWireup="true" CodeBehind="empForm.aspx.cs" Inherits="HRdex_Final.Employee.WebForm2" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="EmpFormContent" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div align="center">
     
        <table >
            <tr>
                <td colspan="2">
                


                </td>
            </tr>
            <tr>
                <td>
                    <table frame="border" 
                        style="border-style: none; width: 643px; background-color: #FFFFFF;">
            <tr>
                
                <td id="Title2" style="width: 101px; text-align: left;">
                    Employee No</td>
                <td id="txtTitle2" style="width: 327px; text-align: left;">
                    <asp:TextBox ID="txtEmpNum" runat="server" Width="318px" 
                        style="margin-left: 0px" MaxLength="4"></asp:TextBox>
                    <asp:FilteredTextBoxExtender ID="txtEmpNum_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterType="Numbers" TargetControlID="txtEmpNum" 
                        ValidChars="1234567890">
                    </asp:FilteredTextBoxExtender>
                &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtEmpNum" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td id="Title0" style="width: 101px; text-align: left;">
                    Last Name</td>
                <td id="txtTitle0" style="width: 327px; text-align: left;">
                    <asp:TextBox ID="txtLName" runat="server" Width="318px" 
                        style="margin-left: 0px" MaxLength="25"></asp:TextBox>
                    <asp:FilteredTextBoxExtender ID="txtLName_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterMode="InvalidChars" 
                        InvalidChars="1234567890" TargetControlID="txtLName">
                    </asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtLName" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td  style="width: 101px; text-align: left;">
                    First Name
                </td>
                <td style="width: 327px; text-align: left;">
                    <asp:TextBox ID="txtFName" runat="server" Width="318px" 
                        style="margin-left: 0px" MaxLength="25"></asp:TextBox>
                    <asp:FilteredTextBoxExtender ID="txtFName_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterMode="InvalidChars" 
                        InvalidChars="1234567890" TargetControlID="txtFName">
                    </asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="txtFName" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 101px; text-align: left;">
                    Middle Name</td>
                <td style="width: 327px; text-align: left;">
                    <asp:TextBox ID="txtMName" runat="server" Width="318px" 
                        style="margin-left: 0px" MaxLength="25"></asp:TextBox>
                    <asp:FilteredTextBoxExtender ID="txtMName_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterMode="InvalidChars" 
                        InvalidChars="1234567890" TargetControlID="txtMName">
                    </asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ControlToValidate="txtMName" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 101px; text-align: left;">
                    Position</td>
                <td  style="width: 327px; text-align: left;">
                    <asp:DropDownList ID="ddlPosition" runat="server" Height="16px" Width="325px" 
                        DataSourceID="Position" DataTextField="catPositionsName" 
                        DataValueField="catPositionsID" >
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="Position" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                        SelectCommand="SELECT * FROM [catPositions]"></asp:SqlDataSource>
                </td>
            </tr>
                        <tr>
                <td id="Title11" style="width: 101px; text-align: left;">
                    Department</td>
                <td id="txtTitle11" style="width: 327px; text-align: left;">
                    <asp:DropDownList ID="ddlDepartment" runat="server" Height="16px" Width="325px" 
                        DataSourceID="Department" DataTextField="DepartmentName" 
                        DataValueField="DeptID" >
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="Department" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                        SelectCommand="SELECT * FROM [catDepartment]"></asp:SqlDataSource>
                </td>
                        </tr>
            <tr>
                <td id="Title3" style="width: 101px; text-align: left;">
                    College</td>
                <td id="txtTitle3" style="width: 327px; text-align: left;">
                    <asp:DropDownList ID="ddlCollege" runat="server" Height="16px" Width="325px" 
                        DataSourceID="College" DataTextField="CollegeName" 
                        DataValueField="CollegeID" >
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="College" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                        SelectCommand="SELECT * FROM [catCollege]"></asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td id="Title10" style="width: 101px; text-align: left;">
                    User Level</td>
                <td id="txtTitle10" style="width: 327px; text-align: left;">
                    <asp:DropDownList ID="ddlUserLevel" runat="server" Height="16px" Width="325px" 
                        DataSourceID="catUserLevel" DataTextField="catUserLevelName" 
                        DataValueField="UserLevelID" >
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="catUserLevel" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                        SelectCommand="SELECT * FROM [catUserLevel]"></asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td id="Title4" style="width: 101px; text-align: left;">
                    Address</td>
                <td id="txtTitle4" style="width: 327px; text-align: left;">
                    <asp:TextBox ID="txtAddress" runat="server" Width="318px" 
                        style="margin-left: 0px" MaxLength="150"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                        ControlToValidate="txtAddress" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td id="Title5" style="width: 101px; text-align: left;">
                    Birthday
                </td>
                <td id="txtTitle5" style="width: 327px; text-align: left;">
                    <asp:TextBox ID="txtBday" runat="server" Width="318px" 
                        style="margin-left: 0px"></asp:TextBox>
                    <asp:CalendarExtender ID="txtBday_CalendarExtender" runat="server" 
                        Enabled="True" TargetControlID="txtBday">
                    </asp:CalendarExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                        ControlToValidate="txtBday" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td id="Title6" style="width: 101px; text-align: left;">
                    Email</td>
                <td id="txtTitle6" style="width: 327px; text-align: left;">
                    <asp:TextBox ID="txtEmail" runat="server" Width="318px" 
                        style="margin-left: 0px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" 
                        ControlToValidate="txtEmail" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="txtEmail" ErrorMessage="Invalid Email" ForeColor="Red" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td id="Title8" style="width: 101px; text-align: left;">
                    Contact No.</td>
                <td id="txtTitle8" style="width: 327px; text-align: left;">
                    <asp:TextBox ID="txtContactNo" runat="server" Width="318px" 
                        style="margin-left: 0px" MaxLength="11"></asp:TextBox>
                    <asp:FilteredTextBoxExtender ID="txtContactNo_FilteredTextBoxExtender" 
                        runat="server" Enabled="True" FilterType="Numbers" 
                        TargetControlID="txtContactNo" ValidChars="1234567890">
                    </asp:FilteredTextBoxExtender>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" 
                        ControlToValidate="txtContactNo" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
                        <tr>
                <td ID="Title12" style="width: 101px; text-align: left;" hidden="hidden">
                    Picture
                    </td>
                    <td ID="txtTitle12" style="width: 327px; text-align: left;" hidden="hidden">
                        <asp:FileUpload ID="fuPicture" runat="server" Width="215px" />
                </td>
                        </tr>
            <tr>
                <td ID="Title" style="text-align: left;" colspan="2">
                    <asp:Label ID="lblConfirmation" runat="server"></asp:Label>
                    <br />
                    <asp:Label ID="lblduplicate" runat="server" style="color: #FF0000"></asp:Label>
                    <br />
                    </td>
                    <tr>
                    <td colspan="2">
                        <asp:Button ID="Button1" runat="server" onclick="btnEdit_Click" Text="Edit" />
                        <asp:Button ID="txtSubmit" runat="server" onclick="txtSubmit_Click" Text="Save" 
                            Width="57px" />
                        <asp:Button ID="txtCancel" runat="server" Text="Cancel" 
                            onclick="txtCancel_Click" />
                    </td>
                </tr>
                    </tr>
                </table>
                </td>
            </tr>
        </table>
    </div>

</asp:Content>